#include <iostream>
#include <algorithm>

using namespace std;

const int N = 110;
const double eps = 1e-4;

int n, m;
double res;

struct Node
{
	int m, w;
	double z;
	
	bool operator< (const Node &t)
	{
		return z > t.z;
	}
}q[N];

int main()
{
	cin >> n >> m;
	
	for (int i = 0; i < n; i ++ )
	{
		int M, W;
		double z;
		cin >> M >> W;
		
		double r = W * 1.0 / M;
		
		q[i] = {M, W, r};
	}
	
	sort(q, q + n);
	
	int i = 0;
	
//	for (int i = 0; i < n; i ++ ) printf("%.2lf", q[i].z);
	
	while (m && i < n)
	{
		if(m >= q[i].m)
		{
			res += q[i].w;
			m -= q[i].m;
		}
		else
		{
			res += q[i].z * m;
			m = 0;
		}
		i ++ ;
	}
	
	printf("%.2lf", res); 
	
	return 0;
} 